package com.example.wac.initBean;

import lombok.extern.slf4j.Slf4j;

import javax.annotation.PostConstruct;

/**
 * @author wuancheng
 * @description
 * @date 2022-06-02 10:22:00
 */

@Slf4j
public class InitBean extends InitBeanConfig{
    /**
     * 构造函数 -> @PostConstruct注解修饰的方法 -> @Bean注解中initMethod指定的方法
     */

    public InitBean() {
        log.info("Step1:begin to execute Constructor Function");
    }

    public void initMethod() {
        log.info("Step3:begin to execute initMethod");
    }


    @PostConstruct
    public void postConstructMethod1() {
        log.info("Step2:begin to execute  postConstructMethod1 with @PostConstruct");
    }

    @PostConstruct
    public void postConstructMethod2() {
        log.info("Step2:begin to execute postConstructMethod2 with @PostConstruct");
    }

}
